import request from '@/utils/request'

// 查询评分-评级专业得分规则列表
export function listRule(query) {
  return request({
    url: '/workSafetyStandardization/rule/list',
    method: 'get',
    params: query
  })
}

// 查询评分-评级专业得分规则详细
export function getRule(gradeMajorRuleId) {
  return request({
    url: '/workSafetyStandardization/rule/' + gradeMajorRuleId,
    method: 'get'
  })
}

// 新增评分-评级专业得分规则
export function addRule(data) {
  return request({
    url: '/workSafetyStandardization/rule',
    method: 'post',
    data: data
  })
}

// 修改评分-评级专业得分规则
export function updateRule(data) {
  return request({
    url: '/workSafetyStandardization/rule',
    method: 'put',
    data: data
  })
}

// 删除评分-评级专业得分规则
export function delRule(gradeMajorRuleId) {
  return request({
    url: '/workSafetyStandardization/rule/' + gradeMajorRuleId,
    method: 'delete'
  })
}
